package com.briup.web.controller;

import com.briup.pojo.Batch;
import com.briup.pojo.Hurdles;
import com.briup.result.Result;
import com.briup.service.BatchService;
import com.briup.service.HurdlesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "补充模块")
@Slf4j
public class SupplementCollection {
    @Autowired
    private BatchService batchService;
    @Autowired
    private HurdlesService hurdlesService;

    @GetMapping("/batch/queryAll")
    @ApiOperation("查询所有批次信息下拉列表接口")
    public Result batchQueryAll(){
        List<Batch> list = batchService.list();
        return Result.success(list);
    }
    @GetMapping("/hurdles/selectAllHurdles")
    @ApiOperation("查询所有栏圈信息下拉列表接口")
    public Result  hurdlesSelectAllHurdles(){
        List<Hurdles> list = hurdlesService.list();
        return Result.success(list);
    }
}
